package com.renren.project.core.rulehandler.handler;

import com.renren.project.core.rulehandler.entity.Rule;
/**
 * @author liyang
 * @version 1.0.0
 * @ClassName AbstractRule
 * @Description 规则模板
 * @createTime 21:17:00 2021/08/22
 */
public abstract class AbstractRule implements IBaseRule{

    protected <T> T  convert(Rule rule){

        return (T) rule;
    }

    @Override
    public boolean execute(Rule rule) {

        return executeRule(this.convert(rule));
    }

    protected <T> boolean executeRule(T t) {
        return true;
    }
}
